const { defineConfig } = require("@vue/cli-service");
const webpack = require('webpack');
module.exports = defineConfig({
  devServer: {
    port: 8081,
  },
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {
        implementation: require("sass"),
      },
    },
  },
  // 确保环境变量被正确加载
  configureWebpack: {
    plugins: [
      new webpack.DefinePlugin({
        'process.env': {
          ...require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` }).parsed
        }
      })
    ]
  }
});